<?php

/**
 * Subclass for performing query and update operations on the 'user' table.
 *
 * 
 *
 * @package lib.model
 */ 
class UserPeer extends BaseUserPeer
{ 
  public static function retrieveByUsername($username)
  {
  	$c = new Criteria();
  	$c->add(UserPeer::USERNAME, $username);
  	
  	return UserPeer::doSelectOne($c);
  }
  
  public static function getPublicUserCriteria()
  {
  	$c = new Criteria();
  	$c->add(UserPeer::VISIBLE, '1');
  	
  	return $c;
  }

  public static function retrievePublicByUsername($username)
  {
  	$c = self::getPublicUserCriteria();
  	$c->add(UserPeer::USERNAME, $username);
  	
  	return UserPeer::doSelectOne($c);
  }  
}
